Skip to content

Refactor node layout to use relative offsets and add play-mode guards#60

Draft
chelproc wants to merge 1 commit into
mainfrom
20260606
Draft

Refactor node layout to use relative offsets and add play-mode guards#60
chelproc wants to merge 1 commit into
mainfrom
20260606

Conversation

@chelproc

@chelproc chelproc commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Separate node layout (relative pin offsets) from geometry (absolute
positions), replacing the single geometry calculator with a
layout → geometry two-step. Switch node SVG wrapper from to
so child elements can use percentage dimensions. Update Display node
to compute its size from config resolution and add a config settings
button stub. Disable the ViewModeSwitcher play button when any input
pin is unconnected. Remove redundant node/connection event listeners
from the simulation trigger.

Key changes covered:

  • Layout / LayoutSource types split out from Geometry, with nodePinOffsetById replacing absolute positions
  • → in Node/index.tsx so Default can use width="100%"
  • Display/geometry.ts now scales with config.resolution and exports layout constants
  • New ConfigSettingButton component for Display nodes
  • isEachInputPinConnected utility in component.ts gating the play button
  • executeSimulation decoupled from raw store events in the core slice

Separate node layout (relative pin offsets) from geometry (absolute
positions), replacing the single geometry calculator with a
layout → geometry two-step. Switch node SVG wrapper from <g> to <svg>
so child elements can use percentage dimensions. Update Display node
to compute its size from config resolution and add a config settings
button stub. Disable the ViewModeSwitcher play button when any input
pin is unconnected. Remove redundant node/connection event listeners
from the simulation trigger.

Key changes covered:
- Layout / LayoutSource types split out from Geometry, with nodePinOffsetById replacing absolute positions
- <g> → <svg> in Node/index.tsx so Default can use width="100%"
- Display/geometry.ts now scales with config.resolution and exports layout constants
- New ConfigSettingButton component for Display nodes
- isEachInputPinConnected utility in component.ts gating the play button
- executeSimulation decoupled from raw store events in the core slice
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying create-cpu-c8345196-9409-4cce-afc4-389f413ad8ee with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4e37d91
Status: ✅  Deploy successful!
Preview URL: https://e510e2ae.create-cpu-c8345196-9409-4cce-afc4-389f413ad8ee.pages.dev
Branch Preview URL: https://20260606.create-cpu-c8345196-9409-4cce-afc4-389f413ad8ee.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant